package com.huawang.mdesign.model.service.vo;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Objects;

/**
 * @Description 关联元素
 * @Date 2022/4/28
 * @Author baibf
 */
@Data
public class DirectionRelatedElement {

    @Schema(title = "关联端元素模型Id 目标")
    private String relatedElementId;

    @Schema(title = "关系模型Id")
    private String relationShipId;

    @Schema(title = "来源模型Id")
    private String sourceElementId;

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DirectionRelatedElement that = (DirectionRelatedElement) o;
        return Objects.equals(relatedElementId, that.relatedElementId) && Objects.equals(relationShipId, that.relationShipId) && Objects.equals(sourceElementId, that.sourceElementId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(relatedElementId, relationShipId, sourceElementId);
    }
}
